Code refactoring
Rebuild packages
Fix a bug conflicting with preload. fix #1