Moved everything median specific from frontend to median