Refactored and restyled

Refactored the code in index into a separate js file. Also changed the design to be a bit more vertical - needs work but happier with it like it is