cleaned up and debugged abstractions for rpi k12
fixed hang bug due to multithreaded nature