Cleanup removed unused code.
Moved parsing related code to separate file.
cleanup