Cleans up a bit of code