Implemented improved logging with Log4j (Fixes #25).