Trying to clean this up a bit