Motion detection scripts + small changes to server