remove unused vars, fix anchors for real