changed: Refactor a bit