Mostly working form.  Function, not pretty