restructure to work with maven and refactored code