Refactor JS to own file, remove testing locale, fix whitespace.