case insensitive keywords

make keywords and functions case-insensitive
better handle spaces after auto-complete of keywords
minor parser fix around spaces after *** headers.