Fixed structured perceptron and cleaned the code.