Main logic for temporal last n is complete. Just need to clean up the services and helping classes