fix some bugs in models
more work on element append tweaks