code to be merged

This is the stuff pulled from Elder's repo with most recent updates,
going to try to merge it with our main branch