Clean up code seems to work