Change solver program from 'object' to 'class' for easy testing