#472, #479 API modifications and tests fixes