Refactored parser, fixed bugs
Fixed bug in drawing