Clean up code a little