Simple implementation of compute. Closes #31.