Refactor with angular bootstrap