First commit of motion detector code