clean up structure, add interfaces