Simplifying DB update routine for media
Code formatting