Add additional error checking, remove a singleton.
Add TODO.
Fix phantom merge conflict.