package refactoring, added some comments.