Improved version of deep comparison including necessary libraries.