Move stuff from find_pad to open/close. Fixed crash when recreating devices? Other minor fixes.