Minor enhancements on APIs

- add method to remove some given percent of tokens form a source file
- check for keywords and mark them as keywords (for the GUI to know to format/paint them properly)