Compile types inside objects with accessors in JS
Add comments to easier find errors.
Update error messages to use new methods