Reorganize directory structure to support npm packaging