Small changes & refactoring