refactored SSUDF, updates in ADM, added some tests for it