Some debug updates to get it running on the pi. p.s. vi is freaking horrible to use.