Simplified - removed SMW-specific code that should have been removed before