Began adding addobjectinstance command. Fixed some small bugs