Added and fixed some comments, also refactoring according to pylint notifications