Started complete refactor