fixed bug: an invalid call to front().size() on an empty list resulting in a nonsense number being returned
added unit tests