Final version after cleaning up.