Refactor companies controller