cleans up unused bits