Fixed some bugs related to the production code. Need to test the motion feature somewhere that isn't busy.