Add preload option and improve test coverage