Refactoring: move JS scripts into separate directory