Resolving some NxM issues. Code still needs major clean-up.