moved doDatabaseActions from model to controller
merged beta-0.1