Add assertions to parser and controller