Cleaned up some formatting
Fixed an incorrect variable usage