Solves #20, improves syntax in #48 and #8.