Renamed a few functions and set everything to max 80 lines