Removed unused method
Work in progress
Some minor refactorings and cleanups