Formatted code and renamed some variables, classes and methods. Added class "Cell"