Code clean up and package added