small fixes and clean up