cleaned up some code style issues, and added the ability to specify hash length as an option