Refactor to make sure integer.  Add test file