Cleaned up some of Devon's code