Cleanup and documentation of the controller instantiation lib