add legend to mobile view and fix controls