reorganized the code and started working on the chunk parser API.