Added testing script (requires Python 3+)
+ Some fixes
Some fixes and refactoring