Make bodies not a global.

Created a function to create the bodies array. This should help
Julia better optimize the code.