removing some logging and fixing pep. Adding licence