Moving components to separate classes