Some minor changes. Also created some separate JavaScript files for greater code readability.