fixed bug in foreach
added cache functions for system, removed uses implementation
moved log variable to config file
merged, resolved conflicts
resolved more merge conflicts