Added parser unit test. Also corrected some const issues.