Fixed UI for the new table structure (without proper add forms)

Added js templates for the functions