simple improvement of UI
change some codes for the better memory management.