Simplified and commented