major refactoring - pulled up class Grid, separated Environment, added Action, implemented Actions for each type