closes #7 - #22, closes #23, closes #24,  closes #26 - #30