More rendering code + clean up