Refactored some functions
Use vector instead of array of ints
Server functionality to receive traffic
Moved utility functions to separate file