Add main logic and GUI