Rafactor View into new class