refactor package layout and code style