Fixed command line parsing for Windows
Some refactoring
Added several low-level ot_utility.ot functions