Fixed up client side, only need to add database operations