Refactor

## Not ready for merge