Now changed matching so it works more correctly. Also implemented pegasos, with some changes.