Improved readability and reduced code duplication in Tree.

Changed all floats to doubles in neural package