Fixed minor parsing bugs and inconsistencies