v 3.1

Fix Bugs, refactoring, new features