Added documentation, cleaned up dead files, and updated API.