Split up code, better separation of concerns