Moving inner case classes to outer for evil kludge