WIP: Getting refactoring to work, fixing Issue #17