reorganized modules
draft of js version