Added selection rendering code.