Joel's latest changes

This is PR #150, but reopened so I can add stuff to it since Joel's on holidays