expose hash generation and tidy up praetorian private vars