more refactoring, lib, use, pack, js examples