Refactor

Merging refactor into develop