Complete implementation of resource preview routes. Fixes #48