Refactor code on draw plane.

delete unused code.