* Added TODO.
* Refactor.

Try making main loop shorter and higher level.