Trivial resource manager (accepts all plans).
Exporting appropriate functions.
Code style tweaks.