Added GUI rendering function.