Reduced read_bit calls
Added conversion from string to list
Changed input handling