Save actions to database, use templates for main page