reorganzing into different files (classes) and creating solve methods
most of reorganization complete