Encapsulated random functions

Created two new functions:
random16() and random3()
Each will return a random number, [0-15] or [0-2] respectively.
How these functions are implemented will probably change in the future,
but the functionality will stay the same.
Also changed -std=c++11 to -std=c++0x to allow slightly older versions of
g++ to compile the code.