1) Cleaned up build scripts.
2) Modified sticky flags.
1) Added a test function (factorial) in d8 to test FunctionTemplate.
1) Categorized external events further.
2) Modified to report the number of times of external events in the log message.