varies fixes and code tyding.