Refactor code to be digit-agnostic
Update readme