Various updates

@ritch I put the changes in this branch for you to review.