The primary duty of these court was to provide proper care and protection to child and young offenders and take all the necessary steps to remove all undesirable surrounding around the offenders and to ensure reformation of the offenders by providing education and training .