move media to be own npm module, begin integration thereof