Add checksum support, remove superflous code