Appserv refactor (heyyy it still works)