9 december refactor

Merging back