Custom `Singleton` trait that is not actually singleton and `Mock_object` added to tests in order to simplify testing allowing to mock and hack system (and not only) objects.
Tiny fixes in system classes (there was errors when calling classes in unusual order).