Initial import.
Force integer division in a few places.
Consolidate tests and update README.