Reordered fxns

apparently I have 300 lines of code for functions that I may or may not
need any longer.  Need to simplify, reorder and save relevant chunks of
code.