code formatting and package cleanup