Seperated most of display's functionality into a new class; fixed the way certain flags were being handled