Some variables renamed, added ? operator for optional actions
More flexible matching for logs and optionals