Improved class, added binary number validation