Bug fixes
Remove unused code
Fix typo