Factored out class to separate file