Updated code to add some comments and clean up some unused functions.
Added in line to be able to handle upper and lower case characters.