Added better time management.