Improvements on parser