Refactored Transaction changing the public key type from long to byte[].
Also changed Transaction hash type into byte[] instead of long.
Reimplemented serialization method of Transaction class.