Search fix

This PR contains the commits of master and the latest ones of the templates including the search functionality.