Refactored a few functions for readability and got rid of a few warnings the code was generating.