General work
Model work; query management command (doesn't quite work yet)
Fix management command and other misc things