Better logging using JMNetworkCore, general code tidying