Package restructuring. Code fixes.