added media module + Resource
added error handling on events
dear diary, today I learned about addEventListener