update constraints and refactor the app boot/run