move fragments into separate class files and add interfaces