Code cleaning for media module