refactor: some cleanup / refactoring