more incomplete even stuff, but database tests all pass and javascript is cleaned up