Using warnings instead of print statements to show alerts.
Fixed astype bug.