Updates to clean up ugly code