Fixed bug with small devices and interaction data, also shuffled things around from the main method and documented them some more