cleaned up reading shader code; added clean_up function