Refactored structure a bit