Added function 'alloc'. Slightly wrong. Look at AllocNew for inspiration.