use instancetype
hide local variables.
fix type of variables.