add header check routine
replace allocator to separate file. fix pool allocator alignment. fix some issues