reorganize directory structue

turn template into module