Add undeclared ivar
Fix bugs and missing imports