Layout updates
nsrl_products updates

Using a standalone function to create the SQL query
Adding comments