Changes TYPE to be dynamic and fixes string formatting to be consistant