remove debug stuff and cleanup