added some documentation + other minor changes