Api: cleanups, changes and improvements