Updated basic rendering code