Added intro comment

Added curly brackets to clarify extensions of function definitions (syntactic sugar)
minor changes, comments, syntactic sugar in code