move Random to the core

and clean up imports