reduce visibility of internal classes, remove redundant expression