Fixed path in build_all to point to the correct directory

Extensions now live in lib/extensions and there's only one kind of them
Stylistic updates

Converted variable assignments of anonymous functions to named
functions.
Removed a dangling comma
Whitespace cleanup