Diashow code not working, full with errors

This might be a long topic at this rate...