Fixed all warning errors, with exception of Project Settings

Fixes for all the outstanding warnings with the exception of the
Project Settings warning. Currently not clear if updating project
settings will require automated reference counting. Will check and test.