full refactor. moving all logic from main class to Pit
added two new classes for refactor