Issue #59: Refactoring & adding unit tests for preload.py
Merge pull request #60 from yurenju/refactoring

fixed Issue #59: Refactoring & adding unit tests for preload.py