Changed all [0] strings to lists wherever possible for consistency, replaced a lot of duplicated code with functions