Added prototype generation to instrumentation and fixed couple of unsigned vs. signed comparison issues.