Somewhat working formula bar refactor for Angular