Long list of accumulated changes

I think I got it working, finally!!