removed some chaff and added integration with log4j