implement and hook module manager; main template