#1 Make rdb configurable and tidy up sample