fixed include in example file
added codes to the lookup file and supporting code
added comments and cleaned up some code
refactored the reference codes to another file
cleaning up