Refactoring and ore dictionary support
Fixed minor AE bugs