Changes in an attempt to implement Serializable