Refactored sample plug-in (SampleResource) to new structure