Code reorg and updated README.md