cleaned up structure, added class templates for final problem