Started fleshing out REST. Added DB stuff.