Fixed bugs in timer class and tidied up.
Fixed bugs in make_basis() which caused problems for sign=0