Small improvements to codebase