Add comments & definition block; some misc fixes