Moved stuff into the class