Add a few checks and tests