Added preloading, and other cleanup...