Cleaned up a little code