Made your code less terrible. ;)