Remove unused. Move some code.