Added guard to prevent leaking periodic functions and added initial test file for the PeriodicExecutor.