updated foundation,

fixed magellan
made magellan segregated if comm or res
Merge pull request #131 from extremezoo/Everett's-branch(6/5/14)

updated foundation,