Minor changes & refactoring