some small refactor, headers finished, magic cookie offset discovery