Finished the keyword handling code for now. Later will have to add Rules and State keywords