some refactoring
Added fields in models for sd, plus some fixes
check point