Adding sample code for retrieving a resource type.
Splitting up getting stack.
Fixing variable name.
Removing unnecessary file.
Using Stack class for preview as well.