Finish up and fix #557