Cleaned up old code