Naming and error-handling improvements