refactoring code to push uuid, and other crypto functions to specific implementations