Added SQL insertion stuff