fixed unnecessary conversions in test_solver, and rearraged common.hpp a bit