Added code to dynamically determine proper segmentation algorithm.
Added Logger class to log app events for future reference/analysis.