change byteswap() in submission to be usable by OSX
minor editorial tweaks