Number to boolean conversion

Number to boolean conversion added.
Unused code stripped.
Little refactoring.