INTERNAL: optimizations made in order to make autograder happy :)
INTERNAL: multiple improvements for the final test.