refactored into templates, starting facebook integration