Improve coffeescript-like version of the contract
Remove the `main` function and assume the data[0] is the action