Simplified and commented.