Converting app to most recent version of swift