More small changes and error messaging