Simplified code
Made code more readable by removing casts to float
Added a commented line which does random tie when selecting best attribute