refactored out .js stuff into separate files
weekend over...