Refactor scalrpy 2

/ WIP