Cleanup1

Logging all implemented via log4j, plus some other minor cleanup.