fixes and formatting mostly