Made code clearer to follow

Added comments to all functions and converted cells array to use
coordinate names instead of two letter names.