This should ideally be done after a solution is found to #7, since it should largely be the same implementation.