Added initial object detection FSM code to objects.c