ADDED: Some documentation to formula engine, removed some dead code