Legibility / i/o

Improved legibility by case matching, type aliases and string
interpolation. Wrote various helper functions for reading the input
files