payments_controller refactored and commented