Batch changes that resulted during working on #58 They are not directly related so it's ok to merge them.