Added frandom (credit: Ryuinferno)
block/deadline: tweak for better android performance