Refactored code, improved help texts, added unicode support