Adding solver routine and cleaning up files