added middleware to prevent admin errors. added base template
gist form added. not used now