Code cleanup
- refactored
- removed unused
- remove outdated comments