package reorganisation
formatted
code review and improvements