Reorganized functions; sidebar/widget support