Complete basic functionality. Refactor for clairity next.