moves checkout steps javascript into specific methods

Fixes #3928