Feature/tidy

See individual commits for details