Added takelastwithtime, and moved some tests