Refactored testing of functions of all classes