Implements getting data from server
Adds butons to template and gives them methods