making the config serializable and fixed some issues after integrative testing