Improving the template by not needing a bean to store the state of the
problem before solving it.