Refactored #65 a little.