updates based on linter and a few other smaller things
added doc file
changed some error handling and template use
changed some field names