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.