Created js files ...

Moved the javascript into it's own separate js files.