Add gallery functionality and some minor fixes(delete category, reset inputs, xml logic and home cotrollers logic errors)