differentiated resource types + mux support

also cleaned up some old code.