Added code to produce debug strings on screen. Not working properly yet.