cleaned the code. added log4j properties to remove the annoying warning in the console.