Added key detection functions
Documented key detection functions, first attempt at markdown