Removed code from other PR and fixed pylint.