Adding documentation and reviewing var names.