restructure imports: move external to lib, internal to res