Added flask architecture