tons of implementation

Added tons of actual code. It is now starting to look like something
useful.