Modularize stuff
Split parseDeclaration implementation into various functions

Also use better error reporting techniques