restructured library load to reduce thumb img get requests