Changed strings to integers where appropriate