Added unpacking to header and started implementing functions