Slim down some code