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