(Frontend) Cleanups/cutdown on code duplication