Added root checking.

Not finished yet. Must do this at the earliest possible time.