Cleaned up a lot of the code Added API documentation Fixed some unit tests Much cleaning left to be done