Add preinstall class, fixes #4