reorganized js files into bsg/ directory