Update 3:

Added:
rednet.open() to main thread.
paralell.waitForAll(mainLoop(), eventLoop()) to main thread.
Did I add selectInventorySlot(1) to main thread now?

Changed:
Cleaned up mainLoop()