Fix extend method. Removed old code. More polish.