Improve interrupt service routines