Large commit, refactoring and features

- Level 3 features
- Refactoring to states