Add underscore and fix json format
Compilation improvements
Change actions to a 'function' instead of a 'bool'
Add error catching