Improving concept.

Added new funtion to calculate random vector and a library to return
randomly -1 or 1.