Improved repr functions for all classes and updated related tests