Added functions file and limit to statistics.
Merged changes.