GUI optimise & Refactor.

1. Single mode complete.
2. Refactor shape create by design pattern of factory.