Got it working for some models, going to refactor now