Movement Detection

First implementation of movement detection. Still need to test them.