refactored code into classes / started debugging JSON elements