add closing of the connection
add saving of company on server
change the code to remove compilation warnings