refactoring, shortening and tidying up definitions.  quality still low as it still lacks a good organization/design/model