cleanup and remove obsolete stuff