Added new class, more optimization on code were made