Moved code around and made some space for Metal rendering