Adjusted common lib and added serialization methods