Introduced Resource; restructured classes.