IO: made file loading more effecient and elegant
Merge branch 'master' into GL