cleaned mess in bundles
removed duplicate code
fixing concurrency issues