more pythonic & added logger

Hi,

just did some minor refactoring. Let me know if you have any questions or I can assist you further. It is a great tool :) - thinking about adding a user interface.

Best regards