clean structure
optimize structure and fix bug