Removed unnecessary properties of the view controller and creating objects inline.