Moved whole process to one class