Relocated main to outside