Program Integrity

Thanks to all above for your suggestions/comments - it's all valid stuff and this is a big learning curve for me. it's one thing to write some code to make things go but another thing all together to write it efficiently and with readability. Back to the drawing board for a bit of a tidy up!