Fully rewritten with multiple sequences. Added optimising proposals.
Added batch testing.