fixed various things
fixed schema to use parent_id