Added expire for nodes older than 5 minutes

Refactored the calculator out made factory to change the calculator