Fix speed regression in time_tools
Small cleanup
Core improvements; log index if constraint error