Libraries
Libraries are located in sitekly/app/Libraries. To modify it just create new file with underscore before name.
To change Payments.php create file _Payments.php with class name _Payments.
Creating new Library:
class _Payments{
Extending original library:
class _Payments extends Payments{
Don't change the original files directly, they might be overwritten with future updates.