Move methods into class