add condition and behavior support; better error reporting; refactor parameter handling