Fix Javascript bugs that arose during refactoring.
Change css for payment page for better synchronization.