add specs for controllers plus refactor code for checkout_controller