Refactoring the packages and added comments.