model and parser implemented

Model needs to be completed. Parser has some TODOs.