finished implementing functionality and cleaned up classes