Fixed semicolon insertion.

The semicolons are now added in the packaging function instead of the
core module. This makes a lot more sense and is much more modular.