improved hex encoding functions
config refactor in prepartion for optional embedded config
improvements for pid file
further work on embedded encrypted config
support for embedded encrypted config
style tidy up
style consistency tidy up