Added some extra preparation stuff for external applications.