Some tweaks to the machine.swift.motemplate

Fixes a few issues I came across while trying out the swift modifications.