Improved Parser and exceptions