Added daily maintenance thread execution and refactored existing
maintenance action code

Change-Id: I67e368f2c1a11e6bb7f9cf46cee23c9bf110d496