Many changes and refactors

New features include attachments, child rendering and authentication