bug fixes, implemented Serializable for custom Object classes