fixes and clean up.