Add some validations
Fixed pep8