Optimized code
Removed old methods