Simplified some expressions as suggested by @arigrant in #18.