Header-based record columns & 'to.object' function addition

Commit messages should explain it all. I'm not sure if I did this right though since I'm new to git.