Minor refactorings

SWIFT IS NOT FINISHED :monkey_face: