cleanup of various code parts