Started media functionality, a bit cleaner code