reorganization + seperate js