Split-up and organize code