initial support for actions, redone condition parsing, added option parsing