move some js to separate file
add public option on form (doesn't do anything yet)