Making beans serializable