Migrate code to src/js/