Fixed bugs, removed a method. Still pending review.