Simplify memory allocation.
Delete 'usleep' system call.