Changed the sendqueue to use actual Queues
Cleaned up the code and removed unused code
Some random fixes