Add resource ns, move respective fn/prototype
Move more into resource ns