Fixed a few bugs associated with crashes & consuming too much system resources; now runs very smoothly and code has been greatly simplified.