Added support for third scenario.

Bug fixes, project clean up.
Added support for the third scenario, included a feature to identify
lesions on training.