Cleaned up block allocation -- now allocation is done all at once for the block and its contents. Also handled malloc() failure a bit more gracefully!