Added state machine for parsing specialized SA query language.
Added tests for parsing
Fixed some issues, mainly with argument parsing