Add list all offices feature and refactore code