Refactor to use uint32

Closes #3.