Added some refactoring and starting to send coordinates