Header fixes and refactoring
models