JS cosmetics: Foundation invocation moved to the end of file