Reorganize sources and run specs as JavaScript