Improved Number and Boolean parsing