Just a bit of refractoring and some preparation.

Preparation for the upgrade system, which will permit to increase speed
for example