Adding write(BedRecord) method, BedAdapter; additional refactoring in to...

...ols