Reduce use of c style arrays and improve naming