Fixed an not so swifty code. Removed old swift syntax code.