Several refactors. New fields test_result and test_output added to solution