Added initial sizes and fixed shifts
Fixed case of Else and If
Added variable name cleaning and attribute type determination