update schema and styles. refactor dynamic form functions