Improved the GUI with JS functionality.

This update mostly concerns transitions between windows.