First attempy at normalizing the code.