Fixes
Fixes part two
Refactoring