small fixes and cleaning