Removed copy-pasted code
Removed dead code