added doc strings and fixes some pylint