Added some types to simplify the program a bit