Moved the partials registering to a function
Moved the partials registering to a function