Changed packaging from war to jar.
Removed repositories and profiles.
cleanup the code and added extra logging