Refactoring some packages and typos