Added serialization, deserialization functions
Added writeToFile and readFromFile functions for byte arrays