Understanding and designing improved functional materials