Address review comments

Fix up dialyzer, move dot macro to common hrl etc