restructured and removed unnecessary module declarations