Added Log4J, bug fixes, update SQL schema