Fixed more rendering code, adjusted util methods, made some things easier to understand.