[WiP] Rewriting program with Swift