Merged in cursor command and added aggregation cursor + tests