Remove some deprecated functions like usleep and memalign. Remove headers that weren't used