Moved some tests around
Improved handling of keywords when ANYCASE is in use