Refactoring of medic module done; Detail subwindows added