Changed most classes, changed converting algorithm, added comments