Fixed the problem. #184 is nearly done, all that's left is cleanup really.