Added documentation and cleaned up small silly things