Various UI and templates fixes #4