Fixed more bugs in the graphics engine
Minor formatting fixes