refactor module definition parser
spec for parsing a module definition file