don't clobber ebx when storing
account for S0 being implemented
code formatting and tidy comments