Refactored JS (well, separate files, at least); added version number