Added pythonfolding. Some refactoring.