Cleaning up code and commenting functions. Dictionary arrays still in progress