main: added controller multiple-instance support (which can now hold resources).