Add a bit more logging, cleanup #defines