Initial sketches of random allocator. Refactoring of the rest of the module here and there. Also, this commit removes trailing whitespace and running empty lines.
Uses customdata instead of modified constructor.
Exported from David's git repository