Functions as actions support

Can define functions as actions instead of URL strings.
Define a function that returns a deffered or the result.