Ability to hook into core classes initializing was implemented. Closes #3687