Added prettify function to convert size in bytes to human readable form.
Cleanup.
Check handle freeing.