Removed the todo about malformed equations. Added tests for malformed equations