Added "Custom actions" preferences tab; various fixes and improvements.