Further simplifying code, closes #8