adds sidebar functions and templates