Minor speed ups