Better structure

Cleaner and easier to maintain.