Add getters and setters for serialization and clean up.