Basic for for resource packing. Bug fixing.