Fix bugs with updating raw staff content
Clean up unused code