Improved Q/timestamp tool