Fixed some terrible solutions to things with the proper way.