removed unnecessary & in swap32
add unnecessary includes and definitions