extract handle-ok fn from defresource, move HTML fns into new view ns