Moving things out of main