refactored a bit the reload system; this fixes a regression with recent Rails version and works better in general