Added some tests and updated the implementation of intention action to match them.