incorporate Eli's cleanups; explicitly use Fixnum + unsafe ops

This pull request:
* Incorporates @elibarzilay's cleanups in #21, resolving conflicts.
* Explicitly use unsafe Fixnum operations (slight speedup by ~0.3s on my computer)