Code improvements - added crc etc