Finishes the basic communication and formats the code