Removes reliance on trim, closes #42