Moved solver templates into separate header files.