Refactor

- Some syntax revisions were required on account of changes in Swift