Fix warnings.

Remove redundant cast
set instancetype as return in init. For clarity