re-organize packages and more fixes