Implemented a lot of the interface.

Many of the methods still need to be tested though.