Refactored the fragment array init functions.

Refactoring to use constants.