Cleaned up depricated functions