added templates
keeps track of state of clients, scans for masters
added front-end
correct json responses and owner tracking
merged joe's front end