a lot of refactorings, added a factory for IAction (formerly ICmd)