All features implemented. Needs cleaning.