beans.js shouldn't be doing any db work
organize deck.js and beansjs