Added export functionalities
Added serialization
Added header table
Refactored code