Shifting from Objective C to Swift, cleaning up code