general cleanup and refactoring tasks to improve code correctness and maintainability
general cleanup and refactoring tasks to improve code correctness and maintainability