moved javascript into its own file
changed additional conditional
simplifying
Merge pull request #1 from DerekRies/master

Code Janitor