Fixed module loading chain.

Implemented several new functions.

Changed and improved the batch tests' layout.

Implemented delayed loading of scripts to avoid memory issues.

Added function to output text to a file.