adds type paramters to grammar
adds variable tree instead of id
fixes specs to compile
impl template arguments