Some rendering changes, TODO: move few lines to CTIEngine