Main template cleaned up