Fixes & refactoring
Fixes & refactoring