Refactor package for Foundation