Function declaration consistency

Updated function declaration spacing throughout to be consistent with the provided guidelines on function declaration. The provided rule states only that the function keyword and calling parens should be followed by a space, and then gives an example in which the function name is also followed by a whitespace. Changed the rule to include putting a space after the function name (taking into account the example) and also updated the rest of the document accordingly.