Right before moving code out of appdelegate into homeview controller because adding was not working