Work on configuration & more

- Configuration fixes
- More configuration tests
- Sanity checks + their tests
- Reorganize some code
- Refactor conf function names
- Start with operations
- Instead of target conf params now use out params
Fix memory issue