class is still too messy, but at least move event handlers to their own method for now