Implemented searchobj and no-action check on foreach loops. Slightly
reworked exception hierarchy.