Added documentation, minor changes