refactor Resource class.

move to base package
set conf to private and provide getter/setter