Removed unused variables. Replaced some properties to class extension from its h-file. Deallocated retained properties. Refactored codes.