implemented update api (still without checking the DB), misc. cleanups