Fixed minor issues and added to sanity checks