Clean code, add consistent logging with log4j, made class for database connection singleton.