re-factor packaging, add logging and make a maven project