Make code more efficient