Minor improvements

Added toUpperCase, stricter lexem analyzer.