Refactor tools to allow better tools in the future, closes #50.