r57 "little cleanups; created our own inline-able rand(); partial
optimization of sign-extensions"