Removed stuff that's no longer used.
Added some documentation.