WIP. Flags added, work in views