Put companies in a separate table and fixed a varity of bugs