Expose program body on the top node level
Refactor top level API to be a function instead of a constructor