Added tests and updated the parser