Extract methods, clean up