Extracted class and moved it to own file