modularize foundation-global to make it more extensible