update: added isEmpty() and clear() to Surface class