First skeleton of max ent classifier
merged changes made separately