Multi use Code that I have written - started with stuff applied to thesis