The main challenge to improving the code on the device is that I don't actually know the programming language the existing code is written in (I know what language it is, but I've never written anything nontrivial in it). The existing code is already bringing in enough dependencies that everything I need is there, but there's a lot of digging through the documentation to find out what the parts I want are named and what would be considered an idiomatic expression of what I'm trying to write.