More debugging, improved sprite handline, improved error handling and
verification in library classes