Improve code quality and readability
Improve Windows support