made access-allow-origin headers *, major improvements to db