Removing unneccessary symbols, validating integer