Move code only used in script modules from core to module.
Remove unused debug/timing code from testing of AF Led code for motion detection.