More efficient, and a bit prettier, and done.