Better struct allocation