Cleanup resource register for simpler adding.
Standardize arg handling.
Remove debug.