Fix some bugs in angular controller. Set up client-side budget model.