move some things around, logging and debug

Signed-off-by: Tim Traver <ttraver@mivamerchant.com>