Fixed the basic features.

Complete but unpolished.