Cleaned up file, new example to reflect mediadir function