bug fixes and refactor for payment screen