Add documentation, remove former comments, iteration fixes