better error messages; pixel stack reallocation implemented but not used