initial refactor, separated classes into files