Removed use_alter, added imports, fixed potential caching issue.