added Atalasoft grayscale conversion capability plus refactoring