server: cleanup, API update