Updated CRC mechanism (first version); added tests