Changed the parameter order for eachr and mapr.
Updated testing framework.
Updated testing framework.
Tidying up.