Cleaned up some unused code to make things more concise.