Add .handlebars file handling; slight refactor of rpc