Replaced deflazytype with simpler implementation.