php frontend initiated

alot of things need cleanup