Cleaned up some unused functions