setTimeout improvement

Figured a way to simplify the function even further.