better error handling, richer API
if statement with typeof operator in condition will never evaluate at parsing
unit tests, readme and some api changes