Fixed byte order and removed log functions from misc_tools