cleaning up. many changes since last commit.