Refactoring/Fixes