Moved various commands into master js file; possibly a bit ugly, but it's better than before ...