Move some code about