refactor bundle

1. refactor bundle code
2. Add macros to use null texture