Fixed normalize. Added junit test case
merged branches