Added CLI infrastructure, fixed missing zero byte to terminate string. Fixed missing UTF-16 encoding