Extracted account API to separate module.