Implemented signature decoding, Added signature checking (fails at the moment).