Refactor: moved internals