Prepare for merging with Burce's code. (MainFragment)
Random function work but ugly and dirty.