Simplified.
Minor performance tweaking.