Adds edit users functionality
Moves tables to templates and few misc. changes