Added documentation; small fixes