Refactor BaseActivity