Move stuff to shared code files