refactor: extract calc core from Activity