Small refactoring and added support for /W (upper case)