introducte base class for resources
common toString implementation
compile fixes