Refactor and Cleanup

* Remove log functions that had a hardcoded peer name (?MODULE)
* Pass peer name into log functions and generate log process name in log
module.
* Allow passing of options so we can set the logdir and statemachine