big refactoring, still old code in some trash folders