Split up locals and ivars
Replace the scope writer with attr_writer
Fix doc and spec strings
Add docs for env variables
Allow passing in settings through the constructor