resolve deferred all when empty array is passed in
reverted accidental removal of the minification, optimised modules to remove one of the else if blocks
convert the record memory module option into a configuration parameter