Fixed several formatting problems and cyclic serialization issues.