cleanups
switch from db access to API