Added in functionality for actions, buys and money

Fixed a problem where actions were not being added correctly and causing
an infinate loop.
merging