moved media logic to module, implemented error generator
moved users to new module logic pattern