Assorted fixes; closes #47