Refactor getActionBar code and clean up project