Cleaned up old logic