Added updated functions for background detection and more cleanups
  * extract_background: was completed although comments are missing
  * bg_without_larvae: was added to extract larva from background